<?php if (!empty($industrylist)) { ?>
<select name="industryid" id="industryid">
<?php echo $industrylist?>
</select>
<?php } ?>
<select name="industrysubid" id="industrysubid">
<?php if (!empty($industrysublist)) { ?>
<?php echo $industrysublist?>
<?php } ?>
</select>
<script>
$("#industryid").change(function(){
	$.get('<?php echo site_url("module/commdata/industry/getIndustrysub")?>' + "/" + $(this).val(), function(d){$("#industrysubid").html(d)});
	$("#industryname").val($(this).find("option:selected").text());
});

$("#industrysubid").change(function(){
	$("#industryname").val($("#industryid").find("option:selected").text() + $("#industrysubid").find("option:selected").text());
});
</script>